<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <title>v-on案例</title>
    <script src="D:\ApplicationFiles\vscode\chapter_three\VUE框架\vue\vue.js"></script>
</head>

<body>
    <div id="app">
        <p>{{count}}</p>
        <button @click="count++">点我</button>

        <button onclick="show()">javascript 点我</button>
        <button v-on:click="show()">v-on:click 点我</button>
        <button @click="show()">简写的事件,点我</button>
        <button @dblclick="show()">双击事件</button>
    </div>
</body>
<script>
    function show() {
        alert("old show");
    }
    new Vue({
        el: "#app",
        data: {
            msg: "hello vue",
            count: 1
        },
        methods: {
            show: function () {
                alert(this.msg)
            }
        }
    })
</script>

</html>